<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    {include file="common/cssInfo" /}
    <script src="__ADMIN__/ueditor/ueditor.config.js"></script>
    <script src="__ADMIN__/ueditor/ueditor.all.min.js"></script>
    <script src="__ADMIN__/ueditor/lang/zh-cn/zh-cn.js"></script>

    <title>添加页</title>
</head>

<body>
    <header>
        {include file="common/nav" /}
    </header>
    <main>
        <div class="main-container container-fluid">
            <div class="page-container">
                <!-- 侧边栏 -->
                {include file="common/sidebar" /}

                <!-- Page Content -->
                <div class="page-content">
                    <!-- Page Breadcrumb -->
                    <div class="page-breadcrumbs">
                        <ul class="breadcrumb">
                            <li>
                                <a href="#">系统</a>
                            </li>
                            <li>
                                <a href="{:url('lst')}">栏目管理</a>
                            </li>
                            <li class="active">修改栏目</li>
                        </ul>
                    </div>
                    <!-- /Page Breadcrumb -->

                    <!-- Page Body -->
                    <div class="page-body">

                        <div class="row">
                            <div class="col-lg-12 col-sm-12 col-xs-12">
                                <div class="widget">
                                    <div class="widget-header bordered-bottom bordered-blue">
                                        <span class="widget-caption">修改栏目</span>
                                    </div>
                                    <div class="widget-body">
                                        <div id="horizontal-form">
                                            <form class="form-horizontal" role="form" action="" method="post">
                                                <input type="hidden" name="id" value="{$cates.id}" />

                                                <div class="form-group">
                                                    <label for="pid" class="col-sm-2 control-label no-padding-right">上级栏目</label>
                                                    <div class="col-sm-6">
                                                        <select name="pid" id="">
                                                            <option value="0">顶级栏目</option>
                                                            {volist name="cateres" id="cate"}
                                                            <option {if condition="$cates['pid'] == $cate['id']"
                                                                }selected="selected" {/if} value="{$cate.id}">{$cate.catename}</option>
                                                            {/volist}
                                                        </select>
                                                    </div>
                                                    <p class="help-block col-sm-4 red">* 必填</p>
                                                </div>

                                                <div class="form-group">
                                                    <label for="catename" class="col-sm-2 control-label no-padding-right">栏目名称</label>
                                                    <div class="col-sm-6">
                                                        <input class="form-control" id="catename" placeholder="" name="catename"
                                                            required="" type="text" value="{$cates.catename}">
                                                    </div>
                                                    <p class="help-block col-sm-4 red">* 必填</p>
                                                </div>

                                                <div class="form-group">
                                                    <label for="catename" class="col-sm-2 control-label no-padding-right">栏目关键词</label>
                                                    <div class="col-sm-6">
                                                        <input class="form-control" id="keywords" placeholder="" name="keywords"
                                                            type="text" value="{$cates.keywords}">
                                                    </div>
                                                    <p class="help-block col-sm-4 red">* 必填</p>
                                                </div>

                                                <div class="form-group">
                                                    <label for="catename" class="col-sm-2 control-label no-padding-right">栏目描述</label>
                                                    <div class="col-sm-6">
                                                        <input class="form-control" id="desc" placeholder="" name="desc"
                                                            type="text" value="{$cates.desc}">
                                                    </div>
                                                    <p class="help-block col-sm-4 red">* 必填</p>
                                                </div>

                                                <div class="form-group">
                                                    <label for="group_id" class="col-sm-2 control-label no-padding-right">栏目类型</label>
                                                    <div class="col-sm-6">
                                                        <div class="radio" style="float:left; margin-right:10px;">
                                                            <label>
                                                                <input type="radio" name="type" value="1" {if condition="$cates['type'] == 1"
                                                                    }checked="checked" {/if} />
                                                                <span class="text">文章列表</span>
                                                            </label>
                                                        </div>
                                                        <div class="radio" style="float:left; margin-right:10px;">
                                                            <label>
                                                                <input type="radio" name="type" value="2" {if condition="$cates['type'] == 2"
                                                                    }checked="checked" {/if} />
                                                                <span class="text">单页</span>
                                                            </label>
                                                        </div>
                                                        <div class="radio" style="float:left; margin-right:10px;">
                                                            <label>
                                                                <input type="radio" name="type" value="3" {if condition="$cates['type'] == 3"
                                                                    }checked="checked" {/if} />
                                                                <span class="text">图片列表</span>
                                                            </label>
                                                        </div>
                                                    </div>
                                                    <p class="help-block col-sm-4 red">* 必填</p>
                                                </div>

                                                <div class="form-group">
                                                    <label for="catename" class="col-sm-2 control-label no-padding-right">栏目内容</label>
                                                    <div class="col-sm-6">
                                                        <!-- 百度富文本编辑器 -->
                                                        <textarea name="content" id="content">{$cates.content}</textarea>
                                                    </div>
                                                    <p class="help-block col-sm-4 red">* 必填</p>
                                                </div>

                                                <div class="form-group">
                                                    <div class="col-sm-offset-2 col-sm-10">
                                                        <button type="submit" class="btn btn-default">修改栏目</button>
                                                    </div>
                                                </div>
                                            </form>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>

                    </div>
                    <!-- /Page Body -->
                </div>
                <!-- /Page Content -->
            </div>
        </div>
    </main>

    <!-- 引入js -->
    {include file="common/jsInfo" /}

    <script type="text/javascript">
        UE.getEditor('content', {
            initialFrameWidth: 800,
            initialFrameHeight: 400
        })
    </script>
</body>

</html>